//
//  GCSendSelfMessgaeViewController.m
//  GoldChampion
//
//  Created by Mac on 2018/4/12.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "GCSendSelfMessgaeViewController.h"

@interface GCSendSelfMessgaeViewController ()

@end

@implementation GCSendSelfMessgaeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"发私信";
    [self configSubView];
    // Do any additional setup after loading the view.
}

- (void)configSubView{
    __weak typeof(self) weakSelf =  self;
    UIView * header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, 30)];
    header.backgroundColor = [UIColor whiteColor];
    
    STButton * searchButton = [[STButton alloc] initWithFrame:CGRectMake(20, 15, UIScreenWidth - 40, 35)
                                                        title:@"查找标签"
                                                   titleColor:SecendTextColor
                                                    titleFont:16
                                                 cornerRadius:4
                                              backgroundColor:self.tableView.backgroundColor
                                              backgroundImage:nil
                                                        image:[UIImage imageNamed:@"搜索8"]];
    searchButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    searchButton.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);
    [searchButton setClicAction:^(UIButton *sender) {
        
    }];
    [header addSubview:searchButton];
    
   
    header.height = searchButton.bottom + 15;
    self.tableView.tableHeaderView = header;
        
}
#pragma --mark UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 8;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 75;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    
    return 0.01;
}
- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    return [UIView new];
}
- (UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    return [UIView new];
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString * reuseIdentifier =  @"cell";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier];
        
    }
    cell.textLabel.textColor = UIColorFromRGBA(0x333333);
    cell.textLabel.font = [UIFont systemFontOfSize:14];
    cell.detailTextLabel.font = [UIFont systemFontOfSize:13];
    cell.detailTextLabel.textColor = UIColorFromRGBA(0x999999);
    
    cell.textLabel.text = @"点击阿卡丽";
    cell.imageView.image = [UIImage imageNamed:@"小微"];
    return cell;
}
#pragma --mark UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
}

@end
